<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>工厂函数与对象</title>
</head>
<body>

    <script>
        function coder(name,age,height)
        {
            this.name = name;
            this.age = age;
            this.height = height;
        }
        
        //创建对象的方式：使用new操作符与函数（类）配合创建
        var person = new coder("cq",18,1.88);
        console.log(person);
          
    </script>
    
</body>
</html>